<template>
  <view v-if="ruleForm.residualValueLogs && ruleForm.residualValueLogs.length === 0">
    <no-data/>
  </view>
  <view v-else>
    <view v-for="(item,index) in ruleForm.residualValueLogs" :key="index">
      <view class="normal-login-container">
        <view class="item-wrap">

          <view class="item-view">
            <text>初期残值</text>
            <text>{{ item.initialResidualValue || '-' }}</text>
          </view>

          <view class="item-view">
            <text>修改前残值</text>
            <text>{{ item.beforeResidualValue || '-' }}</text>
          </view>

          <view class="item-view">
            <text>申请修改残值</text>
            <text>{{ item.commitResidualValue || '-' }}</text>
          </view>

          <view class="item-view">
            <text>提交人</text>
            <text>{{ item.commitName || '-' }}</text>
          </view>

          <view class="item-view">
            <text>提交时间</text>
            <text>{{ item.commitTime || '-' }}</text>
          </view>

          <view class="item-view">
            <text>审核状态</text>
            <text>{{ handleLabel(dict.type.salvage_approval_status, item.approvalStatus) }}</text>
          </view>
        </view>
      </view>
    </view>
  </view>

</template>

<script>
export default {
  name: 'salvageMessage',//残值信息
  dicts:['salvage_approval_status'],
  props: {
    value: {
      type: Object,
      default: {},
    }
  },
  computed: {
    ruleForm: {
      get() {
        let that = this
        const proxy = new Proxy(that.value, {
          get(target, key) {
            return Reflect.get(target, key)
          }
        })
        return proxy
      },
    },
    handleLabel() {
      return function (arr, type) {
        let name = ''
        arr.map((v) => {
          if (type == v.value) {
            name = v.label
          }
        })
        return name || '-'
      }
    },
  },
  watch: {},
  data() {
    return {};
  },
  created() {
  },
  mounted() {
  },
  methods: {},
};
</script>

<style scoped lang="scss">
.item-view {
  display: flex;
  justify-content: space-between;
  padding: 10rpx 20rpx 10rpx 20rpx;
}
</style>


